package com.example.project7.viewmodel;

import com.example.project7.model.RegisterResponse;

public abstract class RegisterState {
    private RegisterState() {}

    public static class Loading extends RegisterState {
        @Override
        public String toString() {
            return "RegisterState.Loading";
        }
    }

    public static class Success extends RegisterState {
        private RegisterResponse data;

        public Success(RegisterResponse data) {
            this.data = data;
        }

        public RegisterResponse getData() {
            return data;
        }

        @Override
        public String toString() {
            return "RegisterState.Success";
        }
    }

    public static class Error extends RegisterState {
        private String errorMessage;

        public Error(String errorMessage) {
            this.errorMessage = errorMessage;
        }

        public String getErrorMessage() {
            return errorMessage;
        }

        @Override
        public String toString() {
            return "RegisterState.Error: " + errorMessage;
        }
    }
}